Meshes
CombinatorialSpaces.SimplicialSets.EmbeddedDeltaSet2D — MethodConstructor for EmbeddedDeltaSet2D from GeometryBasics.Mesh object
This operator should work for any triangular mesh object. Note that it will not preserve any normal, texture, or other attributes from the Mesh object.
CombinatorialSpaces.SimplicialSets.EmbeddedDeltaSet2D — MethodConstructor for EmbeddedDeltaSet2D from mesh file
This operator should work for any file support for import from MeshIO. Note that it will not preserve any normal, texture, or other data beyond points and triangles from the mesh file.
GeometryBasics.Mesh — MethodConstruct a GeometryBasics.Mesh object from an embedded delta set
GeometryBasics.Mesh — MethodConstruct a GeometryBasics.Mesh object from a dual embedded delta set
Graphical Rendering of DeltaSets
Below we have an example of how we render a mesh imported from a .obj file:
using FileIO, WGLMakie, CombinatorialSpaces
set_theme!(resolution=(800, 400))
catmesh = FileIO.load(File{format"OBJ"}(download("https://raw.githubusercontent.com/JuliaPlots/GLMakie.jl/master/src/GLVisualize/assets/cat.obj")))
catmesh_dset = EmbeddedDeltaSet2D(catmesh)
mesh(catmesh_dset, shading=false)This can also be visualized as a wireframe:
wireframe(catmesh_dset)We can also construct and plot the dual of this mesh
dual = EmbeddedDeltaDualComplex2D{Bool, Float32, Point{3, Float32}}(catmesh_dset)
subdivide_duals!(dual, Barycenter())
wireframe(dual)